﻿<%@ Page Title="Turmas" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="CadastroTurmas.aspx.cs" Inherits="AcadPosApp.Cadastros.CadastroTurmas" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script>

        function checarDatas() 
        {
            var pnl_cadastro = document.getEelementById('pnlCadastro');

            var data_1 = pnl_cadastro.txtDtInicio.value;
            var data_2 = pnl_cadastro.txtDtFim.value;
            var data_inicio = parseInt(data_1.split("/")[2].toString() + data_1.split("/")[1].toString() + data_1.split("/")[0].toString());
            var data_fim = parseInt(data_2.split("/")[2].toString() + data_2.split("/")[1].toString() + data_2.split("/")[0].toString());

            if (data_inicio > data_fim) 
            {
                alert("A data de início não pode ser maior que a data de fim. Favor corrigir!");
                return false;
            }
            else 
            {
                return true
            }
        }

        function MascaraMoeda(objTextBox, SeparadorMilesimo, SeparadorDecimal, e) {
            var sep = 0;
            var key = '';
            var i = j = 0;
            var len = len2 = 0;
            var strCheck = '0123456789';
            var aux = aux2 = '';
            var whichCode = (window.Event) ? e.which : e.keyCode;
            if (whichCode == 13) return true;
            key = String.fromCharCode(whichCode); // Valor para o código da Chave 
            if (strCheck.indexOf(key) == -1) return false; // Chave inválida 
            len = objTextBox.value.length;
            for (i = 0; i < len; i++)
                if ((objTextBox.value.charAt(i) != '0') && (objTextBox.value.charAt(i) != SeparadorDecimal)) break;
            aux = '';
            for (; i < len; i++)
                if (strCheck.indexOf(objTextBox.value.charAt(i)) != -1) aux += objTextBox.value.charAt(i);
            aux += key;
            len = aux.length;
            if (len == 0) objTextBox.value = '';
            if (len == 1) objTextBox.value = '0' + SeparadorDecimal + '0' + aux;
            if (len == 2) objTextBox.value = '0' + SeparadorDecimal + aux;
            if (len > 2) {
                aux2 = '';
                for (j = 0, i = len - 3; i >= 0; i--) {
                    if (j == 3) {
                        aux2 += SeparadorMilesimo;
                        j = 0;
                    }
                    aux2 += aux.charAt(i);
                    j++;
                }
                objTextBox.value = '';
                len2 = aux2.length;
                for (i = len2 - 1; i >= 0; i--)
                    objTextBox.value += aux2.charAt(i);
                objTextBox.value += SeparadorDecimal + aux.substr(len - 2, len);
            }
            return false;
        } 
    </script>
    <style type="text/css">
        .style4
        {
        }
        .style6
        {
            width: 470px;
        }
        .style10
        {
        }
        .style12
        {
            width: 50px;
        }
        .style16
        {
            width: 100%;
        }
        .style17
        {
            width: 257px;
        }
        .style18
        {
            width: 311px;
        }
        .style19
        {
            width: 305px;
        }
        .style20
        {
            width: 318px;
        }
        .style23
        {
            width: 175px;
        }
        .style28
        {
            width: 160px;
        }
        .style30
        {
            width: 151px;
        }
        .style31
        {
            width: 309px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="pnlPesquisa" runat="server" GroupingText="Consultas de Cursos">
        <table>
            <tr>
                <td class="style18">
                    Áreas de Conhecimento
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:DropDownList ID="ddlAreaConhecimento" runat="server" Width="300px" AutoPostBack="True"
                        OnSelectedIndexChanged="ddlAreaConhecimento_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style18">
                    Descrição
                </td>
                <td style="font-weight: 700">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:TextBox ID="txtPesquisa" runat="server" MaxLength="250" Width="300px" required="required" ></asp:TextBox>
                    <!-- <asp:RequiredFieldValidator ID="requiredPesquisa" runat="server" ControlToValidate="txtPesquisa"
                        ErrorMessage="É necessário preencher o campo pesquisa!" ForeColor="Red" ValidationGroup="pesquisa"
                        SetFocusOnError="True">*</asp:RequiredFieldValidator>  -->
                </td>
                <td>
                    <asp:Button ID="btnConsultar" runat="server" OnClick="btnConsultar_Click"
                        Text="Consultar" ValidationGroup="pesquisa" Width="100px" />
                </td>
            </tr>
        </table>
        <br />
        <asp:GridView ID="gvwPesquisa" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
            DataKeyNames="ID_CURSO" EmptyDataText="Dados não localizados..." GridLines="Vertical"
            Width="45%" OnRowDataBound="gvwPesquisa_RowDataBound" AllowPaging="True" OnPageIndexChanging="gvwPesquisa_PageIndexChanging"
            OnSelectedIndexChanged="gvwPesquisa_SelectedIndexChanged">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True">
                    <ItemStyle Width="1%" />
                </asp:CommandField>
                <asp:BoundField DataField="ID_CURSO" HeaderText="Código">
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:BoundField>
                <asp:BoundField DataField="DESCRICAO" HeaderText="Cursos">
                    <ItemStyle HorizontalAlign="Left" Width="75%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="SITUACAO" HeaderText="Situação">
                    <ItemStyle Width="10%" HorizontalAlign="Center" />
                </asp:BoundField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <br />
        <table>
            <tr>
                <td>
                    Currículo
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="ddlCurriculoPesquisa" runat="server" AutoPostBack="True" Enabled="false"
                        OnSelectedIndexChanged="ddlCurriculoPesquisa_SelectedIndexChanged" 
                        Width="150px">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <br />
        <table>
            <tr>
                <td class="style19">
                    Estado
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style19">
                    <asp:DropDownList ID="ddlEstadoPesquisa" runat="server" OnSelectedIndexChanged="ddlEstadoPesquisa_SelectedIndexChanged"
                        Width="150px" AutoPostBack="True">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style19">
                    Polo
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style19">
                    <asp:DropDownList ID="ddlPoloPesquisa" runat="server" Enabled="False" Width="300px"
                        AutoPostBack="True" 
                        OnSelectedIndexChanged="ddlPoloPesquisa_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="btnConsultarTurmas" runat="server" formnovalidate="formnovalidate"
                        Text="Consultar" ValidationGroup="pesquisa" 
                        OnClick="btnConsultarTurmas_Click" Width="100px" />
                </td>
            </tr>
        </table>
        <br />
        <asp:GridView ID="gvwPesquisaTurmas" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
            DataKeyNames="ID_TURMA, ID_CURRICULO, ID_POLO, ID_PROFISSIONAL" EmptyDataText="Dados não localizados..."
            GridLines="Vertical" OnRowCommand="gvwPesquisaTurmas_RowCommand" OnRowCreated="gvwPesquisaTurmas_RowCreated"
            OnRowDataBound="gvwPesquisaTurmas_RowDataBound" AllowPaging="True" OnPageIndexChanging="gvwPesquisaTurmas_PageIndexChanging"
            Width="70%">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                    <ItemTemplate>
                        <abbr>
                            <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/edit.png" Text="Alterar"
                                Width="20px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Excluir">
                            <asp:ImageButton ID="Excluir" formnovalidate="formnovalidate" runat="server" CausesValidation="false"
                                OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                CommandName="Excluir" ImageUrl="~/Imagens/delete.png" Text="Excluir" Width="20px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="CURRICULO" HeaderText="Currículo">
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:BoundField>
                <asp:BoundField DataField="DESCRICAO_MODULO" HeaderText="Módulo">
                    <HeaderStyle HorizontalAlign="Center" Width="10%" />
                    <ItemStyle HorizontalAlign="Left" Width="10%" />
                </asp:BoundField>
                <asp:BoundField DataField="COD_TURMA" HeaderText="Turma">
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:BoundField>
                <asp:BoundField DataField="QTD_PARCELAS" HeaderText="Qtde Parcelas">
                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                </asp:BoundField>
                <asp:BoundField DataField="VALOR" HeaderText="Valor" DataFormatString="{0:c}">
                    <HeaderStyle HorizontalAlign="Center" Width="3%" />
                    <ItemStyle HorizontalAlign="Center" Width="3%" />
                </asp:BoundField>
                <asp:BoundField DataField="DATA_INICIO" HeaderText="Data Início">
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:BoundField>
                <asp:BoundField DataField="DATA_FIM" HeaderText="Data Fim">
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:BoundField>
                <asp:BoundField DataField="NOME_PROFISSIONAL" HeaderText="Coordenador">
                    <HeaderStyle HorizontalAlign="Center" Width="10%" />
                    <ItemStyle HorizontalAlign="Center" Width="10%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="SITUACAO" HeaderText="Situação">
                    <ItemStyle Width="5%" HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="LIBERAR_MATRICULA" HeaderText="Lib. Matrícula">
                    <ItemStyle Width="5%" HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="LIBERAR_INICIO_AULA" HeaderText="Lib. Aulas">
                    <ItemStyle Width="5%" HorizontalAlign="Center" />
                </asp:BoundField>
                 <asp:TemplateField HeaderText="Lib. Matrícula">
                    <ItemTemplate>
                        <asp:Image ID="imgStatusMatricula" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="Lib. Aulas">
                    <ItemTemplate>
                        <asp:Image ID="imgStatusAulas" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <br />
        &nbsp;
        <asp:Button ID="btnInserir" runat="server" Text="Inserir" formnovalidate="formnovalidate"
            OnClick="btnInserir_Click" Width="100px" />
    <br /><br />
    </asp:Panel>
    <br />
    <asp:Panel ID="pnlCadastro" runat="server" GroupingText="Cadastro de Turmas" Visible="False">
        <table>
            <tr>
                <td colspan="2">
                    Áreas de Conhecimento
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:DropDownList ID="ddlCadAreaConhecimento" runat="server" Width="300px" Enabled="False">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style31">
                    Descrição
                </td>
                <td class="style12">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style31">
                    <asp:TextBox ID="txtCadDescricao" runat="server" MaxLength="250" Width="300px"
                        Enabled="False" required="required"></asp:TextBox>
                    <!-- <asp:RequiredFieldValidator ID="requiredCadPesquisa" runat="server" ControlToValidate="txtCadDescricao"
                        ErrorMessage="É necessário preencher o campo pesquisa!" ForeColor="Red" SetFocusOnError="True"
                        ValidationGroup="cadPesquisaCurso">*</asp:RequiredFieldValidator> -->
                </td>
                <td class="style12">
                    <asp:Button ID="btnConsultarCursoCad" runat="server"
                        Text="Consultar" ValidationGroup="cadPesquisaCurso" 
                        OnClick="btnConsultarCursoCad_Click" Width="100px" />
                </td>
                <td>
                    &nbsp;&nbsp;
                </td>
            </tr>
            <caption>
            </caption>
        </table>
        <br />
        <asp:GridView ID="gvwCursoCadastro" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
            DataKeyNames="ID_CURSO" EmptyDataText="Dados não localizados..." GridLines="Vertical"
            Width="45%" OnRowDataBound="gvwCursoCadastro_RowDataBound" AllowPaging="True"
            OnPageIndexChanging="gvwCursoCadastro_PageIndexChanging" 
            OnSelectedIndexChanged="gvwCursoCadastro_SelectedIndexChanged">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True">
                    <ItemStyle Width="1%" />
                </asp:CommandField>
                <asp:BoundField DataField="ID_CURSO" HeaderText="Código">
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:BoundField>
                <asp:BoundField DataField="DESCRICAO" HeaderText="Cursos">
                    <ItemStyle HorizontalAlign="Left" Width="75%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="SITUACAO" HeaderText="Situação">
                    <ItemStyle Width="10%" HorizontalAlign="Center" />
                </asp:BoundField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <table>
            <tr>
                <td class="style6">
                    Currículo
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style6">
                    <asp:DropDownList ID="ddlCadCurriculo" runat="server" Enabled="False" Width="150px"
                        OnSelectedIndexChanged="ddlCadCurriculo_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style6">
                    Módulo
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style6">
                    <asp:DropDownList ID="ddlCadModulo" runat="server" Width="300px" 
                        OnSelectedIndexChanged="ddlCadModulo_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td class="style4">
                    Estado
                </td>
            </tr>
            <tr>
                <td class="style4">
                    <asp:DropDownList ID="ddlCadEstado" runat="server" OnSelectedIndexChanged="ddlCadEstado_SelectedIndexChanged"
                        Width="150px" AutoPostBack="True" Enabled="False">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Polo
                </td>
            </tr>
            <tr>
                <td class="style4">
                    <asp:DropDownList ID="ddlCadPolo" runat="server" Enabled="False" Width="300px">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td class="style28">
                    Letra Turma<br />
                    <asp:DropDownList ID="ddlLetraTurma" runat="server" Width="150px">
                        <asp:ListItem Value="A">A</asp:ListItem>
                        <asp:ListItem Value="B">B</asp:ListItem>
                        <asp:ListItem Value="C">C</asp:ListItem>
                        <asp:ListItem Value="D">D</asp:ListItem>
                        <asp:ListItem Value="E">E</asp:ListItem>
                        <asp:ListItem Value="F">F</asp:ListItem>
                        <asp:ListItem Value="G">G</asp:ListItem>
                        <asp:ListItem Value="H">H</asp:ListItem>
                        <asp:ListItem Value="I">I</asp:ListItem>
                        <asp:ListItem Value="J">J</asp:ListItem>
                        <asp:ListItem Value="K">K</asp:ListItem>
                        <asp:ListItem Value="L">L</asp:ListItem>
                        <asp:ListItem Value="M">M</asp:ListItem>
                        <asp:ListItem Value="N">N</asp:ListItem>
                        <asp:ListItem Value="O">O</asp:ListItem>
                        <asp:ListItem Value="P">P</asp:ListItem>
                        <asp:ListItem Value="Q">Q</asp:ListItem>
                        <asp:ListItem Value="R">R</asp:ListItem>
                        <asp:ListItem Value="T">T</asp:ListItem>
                        <asp:ListItem Value="U">U</asp:ListItem>
                        <asp:ListItem Value="V">V</asp:ListItem>
                        <asp:ListItem Value="W">W</asp:ListItem>
                        <asp:ListItem Value="X">X</asp:ListItem>
                        <asp:ListItem Value="Z">Z</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style30">
                    Qde Parcelas<br />
                    <asp:TextBox ID="txtQtdeParcelas" runat="server" AutoPostBack="True" 
                        MaxLength="3" OnTextChanged="txtQtdeParcelas_TextChanged" required="" 
                        Width="140px"></asp:TextBox>
                </td>
                <td class="style23">
                    Valor<br />
                    <asp:TextBox ID="txtValor" runat="server" 
                        onKeyPress="return(MascaraMoeda(this,'.',',',event))" required="" Width="150px"></asp:TextBox>
                </td>
            </tr>
            
            <tr>
                <td class="style28">
                    Data Início<br />
                    <asp:TextBox ID="txtDtInicio" runat="server" MaxLength="10" 
                        required="" Width="150px"></asp:TextBox>
                    <asp:CalendarExtender ID="calendarioDtInicio" runat="server" Enabled="True" 
                        TargetControlID="txtDtInicio">
                    </asp:CalendarExtender>
                </td>
                <td class="style30">
                    Data Fim<br />
                    <asp:TextBox ID="txtDtFim" runat="server" MaxLength="10" 
                        onfocusout="checarDatas" required="" Width="140px"></asp:TextBox>
                    <asp:CalendarExtender ID="calendarioDtFim" runat="server" Enabled="True" 
                        TargetControlID="txtDtFim">
                    </asp:CalendarExtender>
                </td>
                <td class="style23">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style10" colspan="2">
                    Coordenador
                    <br />
                    <asp:TextBox ID="txtCadPesqCoord" runat="server" MaxLength="50" 
                        required="required" Width="300px"></asp:TextBox>
                </td>
                <td class="style23">
                    <br />
                    <asp:Button ID="btnConsultaCoord" runat="server" 
                        OnClick="btnConsultaCoord_Click" Text="Consultar" 
                        ValidationGroup="consultaCoord" Width="100px" />
                </td>
            </tr>
        </table>
        <table>
        </table>
        <br />
        <asp:GridView ID="gvwCoordenador" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
            DataKeyNames="ID_PROFISSIONAL" EmptyDataText="Dados não localizados..." GridLines="Vertical"
            Width="45%" OnPageIndexChanging="gvwCoordenador_PageIndexChanging" PageSize="5"
            AllowPaging="True" OnSelectedIndexChanged="gvwCoordenador_SelectedIndexChanged"
            OnRowDataBound="gvwCoordenador_RowDataBound">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True" />
                <asp:BoundField DataField="NOME" HeaderText="Gestor">
                    <ItemStyle HorizontalAlign="Left" Width="99%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="SITUACAO" HeaderText="Situação">
                    <ItemStyle Width="10%" HorizontalAlign="Center" />
                </asp:BoundField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <br />
        <asp:Panel ID="pnlMatriculaBL" runat="server" Visible="false" GroupingText="Bloquear/Liberar Matrículas">
        <table class="style16">
            <tr>
                <td class="style17">
                    Bloquear/Liberar Matrícula
                </td>
                <td>
                    <asp:DropDownList ID="ddlMatricula" runat="server" Width="120px">
                        <asp:ListItem Value="N">Bloquear</asp:ListItem>
                        <asp:ListItem Value="S">Liberar</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlAulasBL" runat="server" Visible="false" GroupingText="Bloquear/Liberar Início das Aulas">
        <table>
            <tr>
                <td class="style17">
                    Bloquear/Liberar Início das Aulas
                </td>
                <td>
                    <asp:DropDownList ID="ddlInicioAulas" runat="server" Width="120px">
                        <asp:ListItem Value="N">Bloquear</asp:ListItem>
                        <asp:ListItem Value="S">Liberar</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </asp:Panel>
        <br />
        <div class="legenda">
            <asp:Button ID="btnConfirmar" runat="server" Text="Confirmar" ValidationGroup="cadastro"
               OnClick="btnConfirmar_Click" Width="100px" />
            &nbsp;<asp:Button ID="btnCancelar" formnovalidate="formnovalidate" runat="server" Text="Cancelar"
                OnClick="btnCancelar_Click" Width="100px" />
        </div><br />
    </asp:Panel>
    
    <asp:ValidationSummary ID="VSPesquisa" runat="server" ShowMessageBox="True" ShowSummary="False"
        ValidationGroup="pesquisa" />
    <asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True"
        ShowSummary="False" ValidationGroup="consultaCoord" />
    <asp:ValidationSummary ID="ValidationSummary3" runat="server" ShowMessageBox="True"
        ShowSummary="False" ValidationGroup="cadPesquisaCurso" />
</asp:Content>
